package com.ss.android.article.base.feature.app.browser;

import android.content.Intent;

import com.bytedance.common.utility.UIUtils;
import com.ss.android.common.lib.MobClickCombiner;
import com.ss.android.newmedia.activity.browser.BrowserActivity;
import com.ss.android.newmedia.activity.browser.e;

import org.json.JSONObject;

public class MiscBrowserActivity extends BrowserActivity {
    private int a;
    private JSONObject g;

    public MiscBrowserActivity() {

    }

    public final e a() {
        return super.a();
    }

    public void init() {
        long v4 = 0;
        int v9 = 4;
        int v2 = -1;
        Intent v0 = this.getIntent();
        if (v0 != null) {
            this.a = v0.getIntExtra("from", v2);
            String v0_1 = v0.getStringExtra("gd_ext_json");
            if (android.support.design.a.isTextEmpty(v0_1)) {
//                goto label_15;
            } else {
                try {
                    this.g = new JSONObject(v0_1);
                } catch (Exception v0_2) {
                }
            }
        }

        label_15:
        super.init();
        if (this.a != v2) {
            switch (this.a) {
                case 1: {
                    MobClickCombiner.onEvent(this, "buy", "enter", v4, v4, this.g);
                    break;
                }
                case 4: {
                    break;
                }

            }
            UIUtils.setVisibility(this.mRightBtn, v9);
        }
    }

    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
        super.onActivityResult(requestCode, resultCode, intent);
        if (intent != null && resultCode == -1) {
            if (this.a != 5) {
            } else if (requestCode == 100 && (intent.getBooleanExtra("result_key_finish", false))) {
                this.finish();
            }
        }
    }
}

